<!-- include tpl=head_lay -->
<!-- if $project_list -->
<script type="text/javascript">

$(document).ready(function(){
	$("#project li").mouseover(function(){
		$(this).addClass("hover");
	}).mouseout(function(){
		$(this).removeClass("hover");
	}).click(function(){
		var url = $(this).attr("href");
		var txt = $(this).text();
		if(txt == '' || $.trim(txt) == ''){
			txt = $(this).attr('title');
		}
		if(url){
			$.win(txt,url);
			return true;
		}
		$.dialog.alert(p_lang('未指定动作'));
		return false;
	});
});
</script>
<div class="layui-card">
	<div class="layui-card-header">{lang子项信息，请点击操作}</div>
	<div class="layui-card-body">
		<ul class="project" id="project">
			<!-- loop from=$project_list key=$key value=$value -->
			<li id="project_{$value.id}" title="{$value.title}" status="{$value.status}" href="{url ctrl=list func=action id=$value.id/}">
				<div class="img"><img src="{$value.ico ? $value.ico : 'images/ico/default.png'}" /></div>
				<div class="txt" id="txt_{$value.id}">{$value.nick_title ? $value.nick_title : $value.title}</div>
			</li>
			<!-- /loop -->
		</ul>
		<div class="clear"></div>
	</div>
</div>
<!-- /if -->
<script type="text/javascript">
function save()
{
	if(typeof(CKEDITOR) != "undefined"){
		for(var i in CKEDITOR.instances){
			CKEDITOR.instances[i].updateElement();
		}
	}
	$("#post_save").ajaxSubmit({
		'url':get_url('list','save'),
		'type':'post',
		'dataType':'json',
		'success':function(rs){
			if(rs.status){
				$.dialog.tips(p_lang('编辑成功')).lock();
				return true;
			}
			$.dialog.alert(rs.info);
			return false;
		}
	});
	return false;
}
</script>
<form method="post" class="layui-form" id="post_save" onsubmit="return save()">
<input type="hidden" id="id" name="id" value="{$id}" />
<div class="layui-card">
	<div class="layui-card-body">
		<input type="hidden" name="style" id="style" value="{$rs.style}" />
		<div class="layui-form-item">
			<label class="layui-form-label">
				{lang名称}
			</label>
			<div class="layui-input-block">
				<div class="layui-col-sm9">
					<input type="text" id="title" name="title" class="layui-input" style="{$rs.style}" value="{$rs.title}" />
				</div>
			    <div class="layui-col-sm2" style="margin-left:10px;margin-top:3px;">
				    <button type="button" class="layui-btn layui-btn-sm" onclick="$.admin_list.style_setting('style','title')">
						<i class="layui-icon">&#xe64e;</i> {lang样式}
					</button>
			    </div>
			</div>
		</div>
		<!-- loop from=$extlist key=$key value=$value -->
		<div class="layui-form-item">
			<label class="layui-form-label">
				{$value.title}
				<div class="darkblue">[{$value.identifier}]</div>
			</label>
			<div class="layui-input-block">
				{$value.html}
			</div>
			<!-- if $value.note --><div class="layui-input-block mtop">{$value.note}</div><!-- /if -->
		</div>
		<!-- /loop -->
		
	</div>
</div>
<div class="layui-card">
	<div class="layui-card-header hand" onclick="$.admin.card(this)">
		{langSEO优化}
		<i class="layui-icon layui-icon-right"></i>
	</div>
	<div class="layui-card-body hide">
		<div class="layui-form-item">
			<label class="layui-form-label">
				{langSEO标题}
			</label>
			<div class="layui-input-block">
				<input type="text" id="seo_title" name="seo_title" class="layui-input" value="{$rs.seo_title}" />
			</div>
			<div class="layui-input-block mtop">{lang设置此标题后，网站Title将会替代默认定义的，不能超过85个汉字}</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">
				{langSEO关键字}
			</label>
			<div class="layui-input-block">
				<input type="text" id="seo_keywords" name="seo_keywords" class="layui-input" value="{$rs.seo_keywords}" />
			</div>
			<div class="layui-input-block mtop">{lang多个关键字用英文逗号或下划线或竖线隔开}</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">
				{langSEO描述}
			</label>
			<div class="layui-input-block">
				<textarea name="seo_desc" id="seo_desc" class="layui-textarea">{$rs.seo_desc}</textarea>
			</div>
			<div class="layui-input-block mtop">{lang简单描述该主题信息，用于搜索引挈，不支持HTML，不能超过85个汉字}</div>
		</div>
		<div class="layui-form-item">
			<label class="layui-form-label">
				{lang标签}
			</label>
			<div class="layui-input-block">
				<input type="text" id="tag" name="tag" class="layui-input" value='{$rs.tag}' />
			</div>
			<div class="layui-input-block mtop">{lang多个标签用 [title] 分开，最多不能超过10个|title:$tag_config.separator}</div>
		</div>
	</div>
</div>
<div class="clear"></div>
<div class="submit-info">
	<div class="layui-container center">
		<input type="submit" value="{lang提交}" class="layui-btn layui-btn-lg layui-btn-danger" />
		<input type="button" value="{lang取消关闭}" class="layui-btn layui-btn-lg layui-btn-primary" onclick="$.admin.close()" />
	</div>
</div>
</form>

<!-- include tpl=foot_lay -->